<script>
var filename="{{path}}{{file.id}}.{{file.ext}}";
var win = tinyMCEPopup.getWindowArg("window");
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = filename;
if (typeof(win.ImageDialog) != "undefined") {
	if (win.ImageDialog.getImageData) win.ImageDialog.getImageData();
	if (win.ImageDialog.showPreviewImage) win.ImageDialog.showPreviewImage(filename);
}
tinyMCEPopup.close();
</script>
